const mongoose = require('mongoose');
//创建列表集合规则
const listSchema = new mongoose.Schema({
  id: Number,
  title: String,
  address: String,
  holder: String,
  organiser: String,
  status: Boolean,
  remark: String,
  startime: String,
  duration: String,
  grade: [String],
  list: [String],
  summit: String,
  type: String,
});
//创建集合并应用规则
const MeetingList = mongoose.model('MeetingList', listSchema);

//创建文档
// Course.create(
//   {
//     id: 88888888,
//     name: "小组会议",
//     type: 0,
//     address: "301",
//     holder: "张曦",
//     organiser: "赵媛",
//     status: false,
//     remark: "开会需要注意事项开会需要注意事项开会需要注意事项",
//     grade: 0,
//     list: ['张三', '李四', '王五', '赵六']
//   }, (err, doc) => {
//     //  错误对象
//     console.log(err)
//     //  当前插入的文档
//     console.log(doc)
//   });

// const meetingList = new MeetingList({
// id: 12345678,
// name: "小组会议",
// type: 0,
// address: "301",
// holder: "张曦",
// organiser: "赵媛",
// status: false,
// remark: "开会需要注意事项开会需要注意事项开会需要注意事项",
// grade: 0,
// list: ['张三', '李四', '王五', '赵六']
// });
// //将数据保存到数据库中
// meetingList.save();
module.exports = MeetingList;